package com.gitee.cui.springcloud.order.service;

import java.math.BigDecimal;

import com.gitee.cui.springcloud.order.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 扣除账户金额操作
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022-03-26 12:12
 **/
@FeignClient(value = "seata-account-service")
public interface AccountService {

	/**
	 * 扣除账户余额操作
	 * @param userId 用户id
	 * @param money 扣除金额
	 */
	@PostMapping("/account/decrease")
	CommonResult decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
